/**
 * 
 */
package com.vote.service;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.vote.dao.PrizeRecordDao;

//Spring Bean的标识.
@Service
// 默认将类中的所有函数纳入事务管理.
@Transactional
public class PrizeRecordManager{
	
	private static Logger log = LoggerFactory.getLogger(PrizeRecordManager.class);
	@Autowired
	private PrizeRecordDao prizeRecordDao;
		
	public Boolean isHavePrizeRecords(String ip,String cookie){
		if(prizeRecordDao.getPrizeRecordCnt(ip,cookie)>0){
			return true;
		}else{
			return false;
		}		
	}
	
	public PrizeRecordDao getPrizeRecordDao() {
		return prizeRecordDao;
	}
	public void setPrizeRecordDao(PrizeRecordDao prizeRecordDao) {
		this.prizeRecordDao = prizeRecordDao;
	}
}
